<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title><%= @title %></title>
		<%= javascript_include_tag :defaults%>
		<%= stylesheet_link_tag "basic.css"%>
	</head>
	<body>
		<div id="container">
			<%= render :partial => "/partial/top"%>
			<%= render :partial => "/partial/head", :locals => { :class_name => "nav_bar2", :current_page => "design" } %>
			<div id="creative">
            	<div class="addresses">
                    当前位置：<%= link_to "分度网", SITE%>&gt;
					<%= link_to "创意设计", :action => :index, :controller =>"site/design" %>&gt;
					<%= link_to @design.retype.name, :controller => '/site/design', :action => :detail, :id => @design.retype.level%>&gt;
					<%= @design.title%>
              	</div>
              	<div class="left_side">
              		<div class="creative_content">
	                	<h2><%= @design.title%></h2>
						<div id="store_work_<%=@design.id%>" class="store_work">
							<%= link_to_remote "收藏", :url => { :controller => "/store",
																:action => "work",
																:id => @design },
													   :method => :get,
													   :confirm => "确定收藏该设计吗？" %>
						</div>												   
						<ul>
	                    	<li><%= link_to @design.user.profile.company, profile_for(@design.user) %></li>
	                        <li><%= @design.created_at.to_date.to_s%></li>
							<li>浏览：<%= @design.click_times%></li>
	                        <li>评论：<%= @design.work_comments_count%></li>
	                        <li>收藏：<%= @design.lovers.length%></li>
	                    </ul>
						<p><%= @design.content%></p>
						<% @design.pictures.each do |p|%>
						<%= image_tag(p.data.url)%>
						<% end %>
					</div>	
					<div class="creative_comments">
	                   	<h2>本产品评论</h2>
		                <%= render :partial => "comment", :collection => @design.work_comments%>
	                </div>
						
					<div class="add_comment">
						<% form_for(:workComment) do |f| %>
							<label>
								<span class="f_left">发表评论：</span>
								<div class="emotions">
									<a href="javascript:addEmot('good');"><img src='/images/emotions/good.gif' alt="强" title="强" /></a>
									<a href="javascript:addEmot('bad');"><img src='/images/emotions/bad.gif' alt="弱" title="弱" /></a>
									<a href="javascript:addEmot('flower');"><img src='/images/emotions/flower.gif' alt="送花" title="送花" /></a>
									<a href="javascript:addEmot('love');"><img src='/images/emotions/love.gif' alt="仰慕" title="仰慕" /></a>
									<a href="javascript:addEmot('heartache');"><img src='/images/emotions/heartache.gif' alt="心碎" title="心碎" /></a>
									<a href="javascript:addEmot('puke');"><img src='/images/emotions/puke.gif' alt="吐口水" title="吐口水" /></a>
									<a href="javascript:addEmot('fear');"><img src='/images/emotions/fear.gif' alt="惊恐" title="惊恐" /></a>
									<a href="javascript:addEmot('envy');"><img src='/images/emotions/envy.gif' alt="色" title="色" /></a>
									<a href="javascript:addEmot('sad');"><img src='/images/emotions/sad.gif' alt="难过" title="难过" /></a>
									<a href="javascript:addEmot('shy');"><img src='/images/emotions/shy.gif' alt="害羞" title="害羞" /></a>
								</div>
							</label>
							<%= f.text_area :content%>
							<%= submit_tag "提交", :class => "button" %>
							<%= hidden_field_tag 'id', @design.id%>
						<% end %>
					</div>
                </div>
				<div class="right_side">
					
				</div>
            </div>
			<div id="footer">
				<ul>
				    <li><a href="#">关于分度</a></li> 
			        <li><a href="#">服务指南</a></li>
			        <li><a href="#">网站导航</a></li>
					<li><a href="#">诚聘英才</a></li>
				    <li><a href="#">战略伙伴</a></li>
				    <li><a href="#">联系我们</a></li>
				</ul>
		  	</div>
			<div id="dibu">电信经营许可证号 广告经营许可证号 工商注册登记号
				<br/> COPYRIGHT@2008年-2009年 FENDU . ALL RIGHTS RESERVED
			</div>
		</div>
	</body>
</html>